how to fix typeerror unhashable type 'list' in python